//
//  IBLEAnalyse.h
//  IKBLELibrary
//
//  Created by Shanlin on 16/5/12.
//  Copyright © 2016年 zhuxin. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "BLEConfig.h"

@protocol IBLEAnalyse <NSObject>
/**
 *  重置设备
 *
 *  @param deviceType DeviceType
 */
-(void)resetAnalyse:(DeviceType)deviceType;

/**
 end

 @param file 文件路径 tar
 */
-(void)setHeartPrintEcgFile:(NSString *)file;

/**
 心纹分析

 @return return value description
 */
-(int)analyzeHeartPrint;


/**
 获取当前心纹id

 @return deepid
 */
-(NSString *)getCurrentHeartPrintDeepId;


-(int)getMatchedHearPrintDeepIdIndexFormDeepidList:(NSArray <NSString *> *)deepList SsProfileList:(NSArray  <NSString *> *)profileList andCurrentDeepid:(NSString *)deepid;

/**
 *  开始
 *
 *  @param file 文件路径 .tar结尾
 */
-(void)ecgAnalyzeSdkStart:(NSString*)file;
/**
 *  结束
 */
-(void)ecgAnalyzeSdkStop;

/**
 *  保存文件
 */
-(void)ecgAnalyzeSdkCheckMakeReportFile;

-(NSString *)ecgAnalyzeSdkCheckMakeReportFileEx;

/**
 *  获取x的点数
 *
 *  @param millimeter <#millimeter description#>
 *  @param filePath   <#filePath description#>
 *
 *  @return <#return value description#>
 */
-(int) getUnitsFromMillimeterX:(int) millimeter filePath:(NSString*)filePath;
/**
 *  获取y的点数
 *
 *  @param millimeter <#millimeter description#>
 *  @param filePath   <#filePath description#>
 *
 *  @return <#return value description#>
 */
-(int) getUnitsFromMillimeterY:(int) millimeter filePath:(NSString*)filePath;
/**
 *  压缩文件夹 xxx/aaaa
 *  生成xxx/aaaa.tar
 *
 *  @param filePath <#filePath description#>
 */
-(void) ecgAnalyzeSdkPackReportFile:(NSString*)filePath;

-(void) ecgAnalyzeSdkUnPackReportFile:(NSString*)filePath;
/**
 *  获取报告的点数
 *
 *  @param filePath <#filePath description#>
 *
 *  @return <#return value description#>
 */
-(int) ecgAnalyzeSdkGetEcgDataLength:(NSString*)filePath;
/**
 *  根据开始点,长度获取结果的点和点状态
 *
 *  @param filePath      文件路径
 *  @param startPosition 开始的点
 *  @param ecgSize       需要点的长度
 *  @param ecgData       心电数据
 *  @param ecgState      心电数据的状态
 */
-(void) ecgAnalyzeSdkGetEcgDataFromFile:(NSString *)filePath  startPosition:(int)startPosition  ecgSize:(int)ecgSize ecgData:(int *) ecgData ecgState:(int *) ecgState;

@end
